package com.zx.map.service;

import com.zx.map.service.domain.TodoTaskDomain;
import com.zx.map.service.model.TodoTaskModel;
import org.springframework.dao.DataAccessException;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA. User: Administrator Date: 14-3-1 Time: 上午11:06 To
 * change this template use File | Settings | File Templates.
 */
public interface TodoTaskService {

	/**
	 * 查找所有数据列表
	 * 
	 * @return
	 * @throws DataAccessException
	 */
	public List getAllList() throws DataAccessException;

	/**
	 * 根据单Key查找Model
	 * 
	 * @param key
	 * @return
	 * @throws DataAccessException
	 */
	public TodoTaskModel getModelByKey(Integer key) throws DataAccessException;

	/**
	 * 根据Model查找列表
	 * 
	 * @param model
	 * @return
	 * @throws DataAccessException
	 */
	public List<TodoTaskModel> getListByModel(TodoTaskModel model) throws DataAccessException;

	/**
	 * 新增并返回主键
	 * 
	 * @param model
	 * @return
	 * @throws DataAccessException
	 */
	public Integer add(TodoTaskModel model) throws DataAccessException;

	/**
	 * 更新并返回主键
	 * 
	 * @param model
	 * @throws DataAccessException
	 */
	public Integer update(TodoTaskModel model) throws DataAccessException;

	/**
	 * 删除
	 *
	 * @param model
	 * @return
	 * @throws DataAccessException
	 */
	public void delete(TodoTaskModel model) throws DataAccessException;

	/**
	 * 分页查询
	 * 
	 * @param pageSize
	 * @param pageNum
	 * @param domain
	 * @return
	 * @throws DataAccessException
	 */
	public Map getPageByDomain(int pageSize, int pageNum,
			TodoTaskDomain domain) throws DataAccessException;
	/**
	 * 实际的新增todoTaskInfo的方法 
	 * 
	 * add by wenjw 2015.5.14
	 * 
	 * @param object
	 * @param model
	 * @throws DataAccessException
	 */
	public Integer addTodoTask(Object object, TodoTaskModel model) throws DataAccessException, IOException;
	/**
	 * 统一的审核功能
	 * 手工结算
	 * 单笔结算、批量结算
	 * 
	 * @param model
	 * @return
	 * @throws DataAccessException
	 */
	public Integer approveTaskAudit(TodoTaskModel model) throws DataAccessException, IOException, ClassNotFoundException;
	/**
	 * 获得待审核笔数
	 */
	public Integer getCountBytaskType(String taskType,String approveStatus)throws DataAccessException;
	/**
	 * 编辑任务功能
	 * @param model
	 * @param object
	 * @return
	 * @throws DataAccessException
	 */
	public Integer updateTodoTask(Object object, TodoTaskModel model)
			throws DataAccessException, IOException; 
}
